#ifndef __GAME_H__
#define __GAME_H__

#include <vector>
#include <string>
#include <rapidxml.hpp>

#include "error.h"
#include "config.h"
#include "field.h"
#include "movement.h"
#include "player.h"
#include "texel.h"
#include "texture.h"
#include "objtable.h"
#include "tickable.h"

class Game {
	public:
		Game();
		virtual ~Game();

		void LoadConfig (const std::string & configFile) throw(Error);
		void LoadMap(const std::string & mapFile) throw(Error);
		void Draw(SDL_Surface * screen);
		void PrintConfigXML ();
		void PrintInfo();
		Player & GetPlayer() {return player;};
		Field & GetField() {return map;};
		TickableList & GetTickies() {return tickList;};
		ObjTable & GetObjTbl() {return objTable;};
	private:
		rapidxml::xml_document<> ConfigXML;
		std::vector<char> ConfigXMLText; //Yeah I don't like using C strings too;
		ObjTable objTable;
		TickableList tickList;
		Player player;
		Field map;
};

#endif
